package org.marlin.http.http;

import com.alibaba.fastjson.JSON;

import java.util.HashMap;


/**
 * init version 1.5.0
 * @author Jack ZG
 * @since 1.0.0
 */
public class Header
        extends HashMap<String, Object> {
    public static final String KEY_APPID = "appid";
    public static final String KEY_APPKEY = "appKey";
    public static final String KEY_KEY = "key";
    public static final String KEY_SIGN = "sign";
    public static final String KEY_CODE = "code";
    public static final String KEY_DESC = "desc";
    public static final String KEY_USER_ID = "user_id";
    public static final String KEY_USER_NAME = "user_name";
    public static final String KEY_OPERATOR_ID = "operator_id";
    public static final String KEY_OPERATOR_NAME = "operator_name";
    public static final String KEY_METHOD = "method";
    public static final String KEY_URL = "url";
    public static final String KEY_SERVICETYPE = "servicetype";
    public static final String KEY_APITYPE = "apitype";
    public static final String CLIENT_FROM = "client_from";
    public static final String KEY_ORDER_ID = "order_id";
    public static final String KEY_PROJECT = "project";
    public static final String KEY_SYNCBIZ = "syncBiz";
    public static final String KEY_INDEX = "index";
    public static final String KEY_ID = "id";
    public static final String KEY_TIMESTAMP = "timestamp";
    public static final String KEY_TRACELINE = "traceLine";
    public static final String KEY_NOTIFY = "notify";
    public static final String KEY_BIZCODE = "bizCode";
    public static final String KEY_BODY_IDX = "body_idx";
    public static final String KEY_LANGUAGE = "language";
    public static final String SYSTEM_ID = "system_id";

    public Header addParam(String key, Object value) {
        put(key, value);
        return this;
    }

    public String toJSONString() {
        return JSON.toJSONString(this);
    }
}

